{% extends 'apply_base.html' %}

{% block htmltitle %}南区运动广场二楼平台场地申请{% endblock %}

{% block top_title %}<h1 style="font-size:50px">南区运动广场二楼平台场地申请</h1>{% endblock %}

{% block main_content %}
    <form method="POST" enctype="multipart/form-data" action="{{ post_url }}">
        {% csrf_token %}
        <table>
            <tr>
                <td class="title">活动项目</td>
                <td>
                	{{ form.activity }}
        			<div class="error">
            		{% for error in form.activity.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
                <td class="title">申请部门</td>
                <td>
                	{{ form.organization }}
                    <input type="text" disabled="disabled" value="{{user.organization}}"/>
                </td>
            </tr>
            <tr>
                <td class="title">申请人姓名</td>
                <td>
                	{{ form.applicant_name }}
        			<div class="error">
            		{% for error in form.applicant_name.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
        		</div>
                </td>
                <td class="title">联系电话</td>
                <td>
                	{{ form.applicant_phone_number }}
        			<div class="error">
            		{% for error in form.applicant_phone_number.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
            </tr>
            <tr>
                <td class="title">使用日期</td>
                <td colspan="3">                        
                	{{ form.date }}
                    <span>(只能申请14天内的场地)</span>
                    <div class="error">
                    {% for error in form.date.errors %}
                        {{ error }}&nbsp
                    {% endfor %}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">使用时间</td>
                <td colspan="3">
                	{{ form.time }}
        			<div class="error">
            		{% for error in form.time.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
            </tr>
            <tr>
                <td class="title">活动策划<br />文件上传</td>
                <td colspan="3">
                	{{ form.plan_file }}
                    <span>(注：只能上传doc、txt格式文件)</span>
        			<div class="error">
            		{% for error in form.plan_file.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>  
                </td>
            </tr>
            <tr>
                <td class="title">活动内容简介</td>
                <td colspan="3">
                	{{ form.activity_summary }}
        			<div class="error">
            		{% for error in form.activity_summary.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
            </tr>
            <tr>
                <td class="title" rowspan="2">有关赞助说明</td>
                <td colspan="3">
                    <span>赞助商：</span>
                    {{ form.sponsor }}
                    <span>赞助金额及物品：</span>
                    {{ form.sponsorship }}
                    <div class="error">
                    {% for error in form.sponsor.errors %}
                        {{ error }}&nbsp
                    {% endfor %}
                    </div>
        			<div class="error">
            		{% for error in form.sponsorship.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <span>赞助财物主要用于：</span>
                    {{ form.sponsorship_usage }}
        			<div class="error">
            		{% for error in form.sponsorship_usage.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
            </tr>
            <tr>
                <td class="title">备注(可选)</td>
                <td colspan="3">
                	{{ form.remarks }}
        			<div class="error">
            		{% for error in form.remarks.errors %}
                		{{ error }}&nbsp
            		{% endfor %}
        			</div>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <p>申请说明：<br />1.点击上面各个空白方格填写相关资料，全部填完后点击下面“提交”按钮完成网上提交。<br />2.提交的信息经批准后，可以通过“以打印格式查看”页面打印表格，并送交相应单位批准。<br /></p>
                </td>
            </tr>
        </table>
        
        <div class="error" style="margin-left:50%">
            {% for error in form.non_field_errors %}
                {{ error }}&nbsp;
            {% endfor %}
        </div>        
        <div class="button_container">
            <input type="submit" value="提交" />
            <input type="reset" value="重置" style="margin-left:100px;"/>
        </div>
    </form>
{% endblock %}
